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,OAAQ9C,EAAIM,MAAM,CAAC,EAAE,CAAGN,EAAIM,MAAM,CAAC,EAAE,CAACC,GAAG,CAAG,GAC5CyB,MAAO,CACLC,OAAQ,QACRC,KAAM,YACNC,mBAAoB,qBACtB,GATKnC,EAAII,WAAW,IAa1B,GAAAQ,EAAAC,GAAA,EAACkC,EAAAA,CAAGA,CAAAA,CAACC,QAAQ,YACZnD,GACC,GAAAe,EAAAC,GAAA,EAAC6B,EAAAA,GAAeA,CAAAA,CACdjD,KAAMA,EACNwB,MAAO,GAAYd,MAAA,CAATT,EAAS,aACnBiD,kBAAmB,GACnBC,aAAc,GACZ,GAAAhC,EAAAC,GAAA,EAACgC,EAAAA,GAAaA,CAAAA,CACZlD,QAASK,EAAIL,OAAO,CACpBgC,UAAWzC,EAEXgB,KAAMF,EAAII,WAAW,CACrB0B,KAAM,iBAAiC3B,MAAA,CAAhBH,EAAII,WAAW,CAAC,KACvCX,KAAMO,EAAIP,IAAI,CACdqD,OAAQ9C,EAAIM,MAAM,CAAC,EAAE,CAAGN,EAAIM,MAAM,CAAC,EAAE,CAACC,GAAG,CAAG,GAC5CyB,MAAO,CACLC,OAAQ,QACRC,KAAM,YACNC,mBAAoB,sBACtB,GATKnC,EAAII,WAAW,MAgBlC","sources":["webpack://_N_E/?ac5e","webpack://_N_E/./pages/price-funeral/[code]/index.tsx","webpack://_N_E/"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/price-funeral/[code]\",\n function () {\n return require(\"private-next-pages/price-funeral/[code]/index.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/price-funeral/[code]\"])\n });\n }\n ","import { Box, Stack } from \"@mui/material\";\nimport parlors from \"goi_common/src/constants/parlors_detail.json\";\n\nimport {\n ParlorRegionHeadSection,\n CTypeCardView,\n DTypeBreadCrumb,\n ETypeRegionHead,\n BTypeParlorList,\n FUNERAL_SIDO,\n FUNERAL_SIGUNGU,\n ParlorDetailProps,\n numberToLocalString,\n GOI_WEB_URL,\n} from \"goi_common\";\nimport { parlorRegion } from \"@/constants/parlorRegion\";\nimport { GetStaticPaths, GetStaticProps } from \"next\";\nimport Head from \"next/head\";\n\n// Path 로직 안내\n// FUNERAL_SIDO, SIGUNGU의 key로 path 설정.\n//\n// 1. getStaticPaths 내 values 받아서 \"지역 장례식장 추천\" 을 추가한 뒤 params로 넘기게 변경\n// 2. getStaticProps 내 props sidoName, sigunguName replace 로직 추가\n\nconst { regionColor, targetSidos } = parlorRegion;\n\nexport const getStaticPaths: GetStaticPaths = async () => {\n const sidoList = Array.from(FUNERAL_SIDO).filter(([key, val]) =>\n targetSidos.includes(String(key))\n );\n\n const sidoPath = sidoList.map(([key, val]) => {\n return {\n params: {\n code: `${val} 지역 장례식장 추천`,\n },\n };\n });\n\n const sigunguPaths = Array.from(FUNERAL_SIDO)\n .filter(([key, val]) => targetSidos.includes(String(key)))\n .map(([key, val]) => {\n const sigungus = FUNERAL_SIGUNGU.get(key);\n if (sigungus) {\n return Array.from(sigungus.values()).map((sigungu) => {\n return {\n params: {\n code: `${val} 지역-${sigungu} 장례식장 추천`,\n },\n };\n });\n }\n })\n .filter((i) => i != null);\n\n return {\n paths: sidoPath.concat(sigunguPaths?.flat() as Array),\n fallback: false,\n };\n};\n\nfunction getByValue(map: Map, searchValue: any) {\n for (const [key, value] of map.entries()) {\n if (value === searchValue) return key;\n }\n}\n\nexport const getStaticProps: GetStaticProps = async ({ params }) => {\n const code = params?.code as string;\n\n if (code.includes(\"-\")) {\n const [sido, sigungu] = code.split(\"-\");\n const sidoName = sido.replace(\" 지역\", \"\");\n const sigunguName = sigungu.replace(\" 장례식장 추천\", \"\");\n const sidoNumber = getByValue(FUNERAL_SIDO, sidoName);\n const sigunguNumber = getByValue(\n FUNERAL_SIGUNGU.get(sidoNumber as number) as any,\n sigunguName\n );\n\n const regionParlors = parlors.filter(\n (p) => String(p.sigungu) === String(sigunguNumber)\n );\n\n const 가족장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"가족장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 무빈소장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"무빈소\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 일반장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"일반장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n\n let parlorsString = \"\";\n regionParlors.map((p: any) => {\n parlorsString += `${p.companyname} ${numberToLocalString(\n p.binsos[0].charge\n )}원, `;\n });\n\n const description = `${sidoName} ${sigunguName} 내 ${regionParlors.length}곳의 장례식장을 대상으로 한 비교: 1일 동안 100명의 조문객이 참석할 때의 빈소 요금 및 추가 비용. 서울 및 주변 지역 장례식장 추천 비교 포함 | ${parlorsString}...`;\n\n return {\n props: {\n regionParlors,\n expectedParlorPrice: { 무빈소장, 가족장, 일반장 },\n sidoName,\n sido: sidoNumber,\n sigunguName,\n sigungu: sigunguNumber,\n isSigungu: true,\n pageDescription: description,\n pageKeywords: `${sidoName} ${sigunguName} 장례식장, ${sidoName} ${sigunguName} 장례식장 추천, ${sidoName} ${sigunguName} 장례식장 비용, ${sidoName} ${sigunguName} 장례식장 평균 예상 비용, ${sidoName} ${sigunguName} 무빈소, ${sidoName} ${sigunguName} 가족장, ${sidoName} ${sigunguName} `,\n pageOgTitle: `${sidoName} ${sigunguName} 지역 장례식장 추천, 비교 | 서울경기인천장례정보포털`,\n pageOgDescription: description,\n pageOgImage:\n regionParlors.length > 0\n ? regionParlors[0]?.images[0]?.url || \"\"\n : \"\",\n },\n };\n } else {\n const sidoName = code.replace(\" 지역 장례식장 추천\", \"\");\n const sidoNumber = getByValue(FUNERAL_SIDO, sidoName);\n const regionParlors = parlors.filter((p) => p.sido === String(sidoNumber));\n\n const 가족장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"가족장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 무빈소장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"무빈소\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 일반장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"일반장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n\n let parlorsString = \"\";\n regionParlors.map((p: any) => {\n parlorsString += `${p.companyname} ${numberToLocalString(\n p.binsos[0].charge\n )}원, `;\n });\n\n const description = `${sidoName} 내 ${regionParlors.length}곳의 장례식장을 대상으로 한 비교: 1일 동안 100명의 조문객이 참석할 때의 빈소 요금 및 추가 비용. 서울 및 주변 지역 장례식장 추천 비교 포함 | ${parlorsString}...`;\n\n return {\n props: {\n regionParlors,\n expectedParlorPrice: { 무빈소장, 가족장, 일반장 },\n sidoName,\n sido: sidoNumber,\n isSigungu: false,\n pageDescription: description,\n pageKeywords: `${sidoName} 장례식장, ${sidoName} 장례식장 추천, ${sidoName} 장례식장 비용, ${sidoName} 장례식장 평균 예상 비용, ${sidoName} 무빈소, ${sidoName} 가족장, ${sidoName} `,\n pageOgTitle: `${sidoName} 지역 장례식장 추천, 비교 | 서울경기인천장례정보포털`,\n pageOgDescription: description,\n pageOgImage:\n regionParlors.length > 0\n ? regionParlors[0]?.images[0]?.url || \"\"\n : \"\",\n },\n };\n }\n};\n\nexport default function ParlorSlugTypePage({\n regionParlors,\n expectedParlorPrice,\n pageOgTitle,\n sido,\n sidoName,\n sigungu,\n sigunguName,\n isSigungu,\n}: {\n regionParlors: Array;\n expectedParlorPrice: { 무빈소장: number; 가족장: number; 일반장: number };\n pageOgTitle: string;\n sido: string;\n sidoName: string;\n sigungu?: string;\n sigunguName?: string;\n isSigungu: boolean;\n}) {\n const carouselItems = regionParlors.map((res, i) => {\n return {\n \"@type\": \"ListItem\",\n name: `(비용안내) ${res.companyname}`,\n image: `${res.images[0].url}`,\n url: `https://www.metropolitan-funeral.co.kr/parlor-place/${res.companyname}/`,\n position: i + 1,\n };\n });\n\n const carouselRichSearch =\n regionParlors.length > 6\n ? {\n \"@context\": \"http://schema.org\",\n \"@type\": \"ItemList\",\n itemListElement: carouselItems,\n }\n : {};\n\n if (regionParlors.length === 0) {\n return <>;\n }\n\n return (\n <>\n \n {pageOgTitle}\n {regionParlors.length > 5 && (\n \n )}\n \n \n }\n title={\n \n }\n ctaList={[]}\n />\n\n (\n \n )}\n />\n \n {isSigungu && (\n (\n \n )}\n />\n )}\n \n );\n}\n"],"names":["window","__NEXT_P","push","__webpack_require__","regionColor","parlorRegion","ParlorSlugTypePage","param","regionParlors","expectedParlorPrice","pageOgTitle","sido","sidoName","sigungu","sigunguName","isSigungu","carouselItems","map","res","i","name","concat","companyname","image","images","url","position","carouselRichSearch","length","itemListElement","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","Fragment","jsxs","Head","title","script","type","dangerouslySetInnerHTML","__html","JSON","stringify","ParlorRegionHeadSection","breadCrumb","DTypeBreadCrumb","mainColor","firstItem","text","href","GOI_WEB_URL","event","domain","path","trigger_and_target","secondItem","thirdItem","undefined","goiHomeEvent","ETypeRegionHead","ctaList","BTypeParlorList","binsoAveragePrice","CardViewType","CTypeCardView","imgSrc","Box","padding"],"sourceRoot":""}